package com.sx.erp.service.impl;

import java.util.List;

import com.sx.erp.dao.IUserDAO;
import com.sx.erp.domain.User;
import com.sx.erp.service.IUserService;

public class UserServiceImpl implements IUserService {
	private IUserDAO userDao;


	public void setUserDao(IUserDAO userDao) {
		this.userDao = userDao;
	}

	@Override
	public void delete(Long id) {
		userDao.delete(id);
	}

	@Override
	public List<User> getUsers() {

		return userDao.find(null, null);
	}

	@Override
	public User queryUser(User u) {
		return userDao.get(u.getId());
	}

	@Override
	public void save(User u) {
		userDao.save(u);
	}

	@Override
	public void updata(User u) {
		userDao.updata(u);
	}

}
